update(Address, Op)
{
	switch(this.CurrentState)
	{
		
		Case 'M':
			if(Op=1)								//Op=1 indicates Processor Write
			{
				this.CurrentState='M';
			}
			else
			{
				this.CurrentState='M';
			}
		Case 'E':
			if(Op=1)								//Op=1 indicates Processor Write
			{
				this.CurrentState='M';
			}
			else
			{
				this.CurrentState='E';
			}
		
		Case 'S':
			if(Op=1)								//Op=1 indicates Processor Write
			{
				snoop(address);
				this.CurrentState='M';
			}
			else
			{
				this.CurrentState='S';
			}
		
		Case 'I':
			if(Op=1)								//Op=1 indicates Processor Write
			{
				snoop(address);
				this.CurrentState='M';
			}
			else
			{
				ret=snoop(address);
				if(ret)								//ret=TRUE if data is present in other cache
					this.CurrentState='S';
				else
					/*CALL Unified L2 Cache Function*/
					this.CurrentState='E';
			}	
		
	}

}